package com.行为型模型.R观察者模式;

/**
 * 定义具体观察者类，微信用户是观察者，里面实现了更新的方法
 */
public class WeixinUser implements Observer {

    private String name;

    public WeixinUser(String name) {
        this.name = name;
    }

    @Override
    public void update(String msg) {
        System.out.println(name+"-"+msg);
    }
}
